/*
 * BuddySystem.h
 *
 *  Created on: Feb 8, 2012
 *      Author: marc
 */

#include "Allocator.h"
#include "Area.h"
#include <map>

using namespace std;

#ifndef BUDDYSYSTEM_H_
#define BUDDYSYSTEM_H_

class BuddySystem : public Allocator {
	private:
		int init;
		const static int minSize = 32;
		map<int, const Area*> freeMemory;
		int getClosestPOT(int);
		void testMemory();
	public:
		BuddySystem();
		const Area *alloc( int wanted );
		void free( const Area * );
};

#endif /* BUDDYSYSTEM_H_ */
